import vue from 'vue'
import vuex from 'vuex'
import user from "@/store/modules/user";
import setting from "@/store/modules/setting";

vue.use(vuex)

const store = new vuex.Store({
    state: {
        count: 101,
        token: '456e4tw5413ert56',
        code: 200,
        letter: 'K'
    },
    mutations: {
        addCount (state, num){
            state.count += num
        },
        splic (state){
            state.letter = state.letter + 'iorry'
        }
    },
    modules: {
        user,
        setting
    }
})

export default store